import request from '@/utils/request'
// 显示所有收货地址
export const getAddressList = () => {
	return request({
		method: 'GET',
		url: '/member/address/list',
	})
}
// 删除收货地址
export const delAddress = id => {
	return request({
		method: 'POST',
		url: `/member/address/delete/${id}`,
	})
}
// 添加收货地址
export const addAddress = data => {
	return request({
		method: 'POST',
		url: '/member/address/add',
		data,
	})
}
// 修改收货地址
export const editAddress = data => {
	return request({
		method: 'POST',
		url: `/member/address/update/${data.id}`,
		data,
	})
}
// 获取收货地址详情
export const getAddressDetail = id => {
	return request({
		method: 'GET',
		url: `/member/address/${id}`,
	})
}
